package com.cgnpc.scp.common.utils;

public class SqlUtil {
    /**
     * 批量插入数据时每批的最大数量
     */
    public static final int INSERT_BATCH_MAX_ROWS = 3000;

    public static final String SQL_CONDITION_LIKE = "%";

    public static String valueJoinLikeLeft(String value) {
        if (value == null) {
            return null;
        }

        return SQL_CONDITION_LIKE + value;
    }

    public static String valueJoinLikeRight(String value) {
        if (value == null) {
            return null;
        }

        return value + SQL_CONDITION_LIKE;
    }

    public static String valueJoinLikeBoth(String value) {
        if (value == null) {
            return null;
        }

        return SQL_CONDITION_LIKE + value + SQL_CONDITION_LIKE;
    }
}
